<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 400px;
            position: relative;
            background-color: orange;
            margin: 200px auto;
            perspective: 400px;
            transform-style: preserve-3d;
            transition: linear 2s;
        }
        .w{
            width: 200px;
            height: 400px;
            background-color: pink;
            position: absolute;
            top: 0;
            transform: rotateX(45deg);
        }
        .box:hover{
            transform:rotateY(360deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="w"></div>
    </div>
</body>
</html>
